#Conf
cmake_minimum_required(VERSION 2.8)
if(NOT KDE4_FOUND)
  find_package(KDE4 REQUIRED)
  include_directories( ${KDE4_INCLUDES} ${QT_INCLUDES} )
endif(NOT KDE4_FOUND)


# compile and link and install plugin library ###############
set(katesymbolbrowserplugin_SRCS 
    katesymbolbrowserplugin.cpp
    katesymbolbrowserview.cpp
    katesybmolbrowserconfigpage.cpp
    katedocumentparser.cpp
    common/symbol.cpp
    common/documentparser.cpp
    common/items.cpp
    common/parsers/parser.cpp
    common/parsers/vstring.cpp
    common/parsers/parser.cpp
    common/parsers/parserex.cpp
    common/parsers/keyword.cpp

    common/parserthread.cpp

    common/symbolbrowserview.cpp
)

set(RESOURCES
    common/symbols.qrc
)

qt4_add_resources(QRC_SOURCES ${RESOURCES})

kde4_add_plugin(katesymbolbrowserplugin ${katesymbolbrowserplugin_SRCS} ${QRC_SOURCES})


target_link_libraries(
    katesymbolbrowserplugin  
    ${KDE4_KDEUI_LIBS} 
    ${KDE4_KPARTS_LIBS} 
    kateinterfaces  
    ${KDE4_KTEXTEDITOR_LIBS}
)

install(TARGETS katesymbolbrowserplugin  DESTINATION ${PLUGIN_INSTALL_DIR} )


# install support files ###############
#install( FILES ui.rc  DESTINATION  ${DATA_INSTALL_DIR}/kate/plugins/katesymbolbrowser )
install( FILES katesymbolbrowser.desktop  DESTINATION  ${SERVICES_INSTALL_DIR} )

